<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

</body>
<script>
  class People {
    constructor(name, age) {
      this.age = age
      this.name = name
    }
    show() {
      console.log(this.name)
    }
  }
  class Coder extends People {
    constructor(name, age, company) {
      super(name, age)
      this.company = company
    }
    showCompany() {
      console.log(this.company)
    }
  }
  let obj = new Coder("tom", 22, "bilibili")
</script>

</html>